#ifndef ELEMENTS_EDGE_H
#define ELEMENTS_EDGE_H

#include "element.h"

namespace Elements
{

struct Edge : public Element
{
    Edge() = default;
    Edge(const Edge& other);

    // -- Интерфейс элемента -- //

    virtual bool isSame(Element* other) const override;

    virtual Common::Json toJson() const override;
    virtual void fromJson(const Common::Json& json) override;

    virtual Element* clone() const override;
    virtual ElementType elementType() const override;

    // -- Интерфейс данных -- //

    unsigned beginStateId() const;
    void setBeginStateId(const unsigned value);

    unsigned endStateId() const;
    void setEndStateId(const unsigned value);

private:
    unsigned m_beginStateId;
    unsigned m_endStateId;
};

typedef std::shared_ptr<Edge> EdgePtr;
typedef std::vector<EdgePtr> Edges;

} // namespace Elements

#endif // ELEMENTS_EDGE_H
